package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DyWorldBankCardMapper;
import com.ruoyi.system.domain.DyWorldBankCard;
import com.ruoyi.system.service.IDyWorldBankCardService;

/**
 * 银行卡BINService业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-17
 */
@Service
public class DyWorldBankCardServiceImpl implements IDyWorldBankCardService 
{
    @Autowired
    private DyWorldBankCardMapper dyWorldBankCardMapper;

    /**
     * 查询银行卡BIN
     * 
     * @param id 银行卡BIN主键
     * @return 银行卡BIN
     */
    @Override
    public DyWorldBankCard selectDyWorldBankCardById(Long id)
    {
        return dyWorldBankCardMapper.selectDyWorldBankCardById(id);
    }

    /**
     * 查询银行卡BIN列表
     * 
     * @param dyWorldBankCard 银行卡BIN
     * @return 银行卡BIN
     */
    @Override
    public List<DyWorldBankCard> selectDyWorldBankCardList(DyWorldBankCard dyWorldBankCard)
    {
        return dyWorldBankCardMapper.selectDyWorldBankCardList(dyWorldBankCard);
    }

    /**
     * 新增银行卡BIN
     * 
     * @param dyWorldBankCard 银行卡BIN
     * @return 结果
     */
    @Override
    public int insertDyWorldBankCard(DyWorldBankCard dyWorldBankCard)
    {
        dyWorldBankCard.setCreateTime(DateUtils.getNowDate());
        return dyWorldBankCardMapper.insertDyWorldBankCard(dyWorldBankCard);
    }

    /**
     * 修改银行卡BIN
     * 
     * @param dyWorldBankCard 银行卡BIN
     * @return 结果
     */
    @Override
    public int updateDyWorldBankCard(DyWorldBankCard dyWorldBankCard)
    {
        dyWorldBankCard.setUpdateTime(DateUtils.getNowDate());
        return dyWorldBankCardMapper.updateDyWorldBankCard(dyWorldBankCard);
    }

    /**
     * 批量删除银行卡BIN
     * 
     * @param ids 需要删除的银行卡BIN主键
     * @return 结果
     */
    @Override
    public int deleteDyWorldBankCardByIds(Long[] ids)
    {
        return dyWorldBankCardMapper.deleteDyWorldBankCardByIds(ids);
    }

    /**
     * 删除银行卡BIN信息
     * 
     * @param id 银行卡BIN主键
     * @return 结果
     */
    @Override
    public int deleteDyWorldBankCardById(Long id)
    {
        return dyWorldBankCardMapper.deleteDyWorldBankCardById(id);
    }
}
